<?php
session_start();
require_once("Structure/fonctions.php");

$PAGE_TITLE = "Acceuil";
$CONTENT_INCLUDE = "index.html";

$bdd = mysqli_connect(DB_HOST, DB_USER, DB_PWD, DB_BASE);

include("Structure/updateUser.php");

$query = "SELECT    a.id, title, content, type, note, a.date, a.statusID, a.autorID, u.pseudo autor, link, i.statusID imgStatus
          FROM      articles a
          JOIN      images i ON a.imageID = i.id
          JOIN      users u ON a.autorID = u.id
          WHERE     a.statusID = 1
          ORDER BY  a.note DESC
          LIMIT     0,5 ;";


$res_last = mysqli_query($bdd, $query) or die(mysqli_error($bdd));

include_once ("Structure/structure.php");
?>